#include <stdlib.h>
#include <stdio.h>
#include "util.h"

void print_a(int a[], int n)
{
    int i;

    if (a == NULL || n <= 0)
	return;

    fprintf(stdout, "%d elements:\n\t", n);
    for (i = 0; i < n; i++)
    {
	fprintf(stdout, "%d\t", a[i]);
	if (i && ((i+1) % N_PER_LINE) == 0)
	{
	    fprintf(stdout, "\n\t");
	}
    }
    fprintf(stdout, "\n");
}

